// Copyright 2019 by linx, All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package redis

import (
	"text/app"
	"github.com/gogf/gf/util/gconv"
	"time"
)

func Set(key interface{}, value interface{}, expire time.Duration) error {
	return app.Redis.Set(app.RedisKeyPrefix+gconv.String(key), value, expire).Err()
}
func Get(key interface{}) (string, error) {
	return app.Redis.Get(app.RedisKeyPrefix + gconv.String(key)).Result()
}

func Del(key interface{}) error {
	return app.Redis.Del(app.RedisKeyPrefix + gconv.String(key)).Err()
}
